﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo01
{
    class Program
    {
         static void Main(string[] args)
        {
            Text();
            Text1();
            Text2();
        }

        public static void Text() 
        {
            Console.WriteLine("请输入圆的半径：");
            double r = double.Parse(Console.ReadLine());
            double s = (r * r * 3.14);

            Console.WriteLine("面积{0}",s);
            Console.ReadLine();
            
        }

        public static void Text1()
        {
            Console.WriteLine("请用户输入一个四位整数：");
            int a = int.Parse(Console.ReadLine());

            int number1 = a / 1000;
            int number2 = a % 1000 / 100;
            int number3 = a % 1000 % 100 / 10;
            int number4 = a % 10;

            Console.WriteLine("千分位为{0} ", number1);
            Console.WriteLine("百分位为{0} ", number2);
            Console.WriteLine("十分位为{0} ", number3);
            Console.WriteLine("个位为{0} ", number4);
            Console.ReadLine();
        }
        public static void Text2()
        {
            Console.WriteLine("输入第一个数字");
            int a = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("输入第二个数字");
            int b = int.Parse(Console.ReadLine());
            Console.WriteLine("输入第三个数字");
            int c = int.Parse(Console.ReadLine());
            int max = 0;
            max = a > b ? a : b;
            max = max > c ? max : c;
            Console.WriteLine("最大值为{0}",max);
            Console.ReadLine();

        }
    }
}
